/*****************************************************************************
 *
 *                      HUSONG PROPRIETARY INFORMATION
 *
 *          The information contained herein is proprietary to HUSONG
 *           and shall not be reproduced or disclosed in whole or in part
 *                    or used for any design or manufacture
 *              without direct written authorization from HUSONG.
 *
 *            Copyright (c) 2015 by HUSONG.  All rights reserved.
 *
 *****************************************************************************/
package com.husong.common.shiro.mgt;

import org.apache.shiro.subject.Subject;
import org.apache.shiro.subject.SubjectContext;
import org.apache.shiro.web.mgt.DefaultWebSubjectFactory;

/**
 * @author maxmin
 *
 * @date 2015年11月9日 上午11:13:17
 */
public class StatelessDefaultSubjectFactory extends DefaultWebSubjectFactory {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.apache.shiro.web.mgt.DefaultWebSubjectFactory#createSubject(org.apache
	 * .shiro.subject.SubjectContext)
	 */
	@Override
	public Subject createSubject(SubjectContext context) {
		// 不创建session
		context.setSessionCreationEnabled(false);
		return super.createSubject(context);
	}

}
